/* 
 * File:   CErrors.cpp
 * Author: andrea
 * 
 * Created on November 5, 2013, 10:56 PM
 */

#include "CErrors.h"

using namespace std;
using namespace cv;

CErrors::CErrors() {
}

std::string CErrors::getErrorMessage(int errorCode) {
    switch (errorCode) {
        case CUSERR_SRC_DST_SIZES_NOT_MATCHING:
            return "Source and Destination image must have the same size";
        case CUSERR_WRONG_CHANNEL_NAME:
            return "You passed a wrong channel name";
        case CUSERR_WRONG_SATURATION_LEVEL:
            return "Saturation level must be from 0 to 255";
        case CUSERR_MATRIX_SIDE_EVEN_EXPEC_ODD:
            return "Matrix side is even. Expected odd size";
        case CUSERR_SELECTED_PIXEL_TOO_BIG_MAT_SIDE:
            return "Matrix side is too big for the selected pixel";
        default:
            return "Some error";
    }
}
